
from pydantic import BaseModel
from typing import Union



class UserAdd(BaseModel):
    name: str
    password: str


class UserUpdate(BaseModel):
    id: int


class PageRequest(BaseModel):
    page: int = 1
    page_size: int = 1000



class UserLogin(UserAdd):
    pass



class DataSourceRequest(BaseModel):
    host: str
    port: str
    username: str
    password: str
    db: str


class TableInfoRequest(DataSourceRequest):
    table: str
